﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SmartHotel.Migrations
{
    public partial class create73房态修改 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "RoomNumbet",
                table: "SmartHotel_HouseState");

            migrationBuilder.RenameColumn(
                name: "RoomMoney",
                table: "SmartHotel_HouseState",
                newName: "RackRate");

            migrationBuilder.AddColumn<decimal>(
                name: "AveragePrice",
                table: "SmartHotel_HouseState",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "HouseType",
                table: "SmartHotel_HouseState",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "RowHouse",
                table: "SmartHotel_HouseState",
                type: "nvarchar(max)",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AveragePrice",
                table: "SmartHotel_HouseState");

            migrationBuilder.DropColumn(
                name: "HouseType",
                table: "SmartHotel_HouseState");

            migrationBuilder.DropColumn(
                name: "RowHouse",
                table: "SmartHotel_HouseState");

            migrationBuilder.RenameColumn(
                name: "RackRate",
                table: "SmartHotel_HouseState",
                newName: "RoomMoney");

            migrationBuilder.AddColumn<int>(
                name: "RoomNumbet",
                table: "SmartHotel_HouseState",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
